package com.pt.chitra.view.editView.view
{
	import com.pt.chitra.config.ApplicationNotificationConstant;
	
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;

	public class EditViewMediator extends Mediator implements IMediator
	{
		/*name of the Mediator */
        public static const NAME:String = "EditViewMediator";

		
		public function EditViewMediator(viewComponent:Object)
		{
			super(NAME, viewComponent);
		}
		//Do something -- Skulkarni
		/***
		 * Check for session object
		 * 
		 * */
		override public function onRegister():void
		{
			
			
		}
		// Do Something -- Skulkarni
		override public function onRemove():void
		{
		}
			
		override public function listNotificationInterests():Array
		{
			return [
				ApplicationNotificationConstant.EDIT_IMAGE_PATH
			];
		}
		
		override public function handleNotification(notification:INotification):void
		{
			 switch(notification.getName()){
				case ApplicationNotificationConstant.EDIT_IMAGE_PATH:
					editView.editImage.url = notification.getBody()as String;
				break;
			} 
		}
		
		protected function get editView():EditView
        {
            return viewComponent as EditView;
        }

		
	}
}